package com.liang.subject.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 题目类型枚举
 * 1：单选 2：多选 3：判断 4：简答
 */
@Getter
@AllArgsConstructor
public enum SubjectLikedStatusEnum {

    LIKED(1, "点赞"),
    UN_LIKED(0, "取消点赞");

    private final int status;
    private final String desc;

    public static SubjectLikedStatusEnum getByCode(int status) {
        for (SubjectLikedStatusEnum subjectInfoTypeEnum : SubjectLikedStatusEnum.values()) {
            if (subjectInfoTypeEnum.status == status) {
                return subjectInfoTypeEnum;
            }
        }
        return null;
    }
}
